package com.blb.service.impl;

import com.blb.entity.Goodstype;
import com.blb.mapper.GoodstypeMapper;
import com.blb.service.IGoodstypeService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author txy
 * @since 2019-07-11
 */
@Service
public class GoodstypeServiceImpl extends ServiceImpl<GoodstypeMapper, Goodstype> implements IGoodstypeService {

    @Autowired
    private GoodstypeMapper goodstypeMapper;

    /**
     * 通过商品id查询商品类别
     */
    @Override
    public List<Goodstype> getGoodstypeByid(String comId) {
        List<Goodstype> list = goodstypeMapper.selectList(new QueryWrapper<Goodstype>().eq("com_id", comId));
        return list;
    }

}
